//
//  MutipCollectionViewController.m
//  Select
//
//  Created by dihuijun on 17/3/20.
//  Copyright © 2017年 Cycle. All rights reserved.
//

#import "MutipCollectionViewController.h"
#import "MutiChooseCollectionView.h"
@interface MutipCollectionViewController ()
/**   datasource   */
@property (nonatomic, strong) NSMutableArray *datasource;
/**   mutipChooseView   */
@property (nonatomic, strong) MutiChooseCollectionView *chooseView;
@end

@implementation MutipCollectionViewController
/**   datasource   */
- (NSMutableArray *)datasource{
    if(!_datasource){
        _datasource = [NSMutableArray arrayWithObjects:@"1",@"2",@"3",@"4", nil];
    }
    return _datasource;
}
/**   mutipChooseView   */
- (MutiChooseCollectionView *)chooseView{
    if(!_chooseView){
        _chooseView = [MutiChooseCollectionView shareCollectionViewWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, self.view.frame.size.height) HeaderTitle:@"全选"];
        //数据
        _chooseView.datasource = self.datasource;
        //点击
        _chooseView.block = ^(NSString *content,NSMutableArray *arr){
            NSLog(@"%@",arr);
        };
    }
    return _chooseView;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"collectionView多选";
    
    
    [self.view addSubview:self.chooseView];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
